package com.dwd.org.mapper;

import com.dwd.basic.mapper.BaseMapper;
import com.dwd.org.pojo.Department;
import com.dwd.org.pojo.Employee;
import com.dwd.org.query.DepartmentQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/5 11:31
 * @Version 1.0
 */
@Repository
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     * 修改查询一二级权限
     * @param id
     * @return
     */
    List<Department> queryLevelOneAndTwo(Long id);

    /**
     * 增加查询一二级权限
     * @return
     */
    List<Department> queryLevelOneAndTwo2();

    /**
     * 根据父id查询子部门
     * @param id
     * @return
     */
    List<Department> queryDepByParentId(Long id);

    /**
     * 查询父id
     * @param id
     * @return
     */
    Long queryParentId(Long id);
}
